package tool

const DefaultTimeFormat = "2006-01-02 15:04:05"

func StringSliceUniq(data []string) []string {
	uniqMap := make(map[string]struct{})
	for _, v := range data {
		uniqMap[v] = struct{}{}
	}
	uniq := make([]string, 0)
	for k := range uniqMap {
		uniq = append(uniq, k)
	}

	return uniq
}

func Int64SliceUniq(data []int64) []int64 {
	uniqMap := make(map[int64]struct{})
	for _, v := range data {
		uniqMap[v] = struct{}{}
	}
	uniq := make([]int64, 0)
	for k := range uniqMap {
		uniq = append(uniq, k)
	}

	return uniq
}
